cmake_minimum_required(VERSION 3.16.3)

project(main)


set(TEST_SRC_DIR ${PROJECT_SOURCE_DIR}/Src)
set(TEST_INC_DIR ${PROJECT_SOURCE_DIR}/Inc)
set(TEST_LIB_DIR ${PROJECT_SOURCE_DIR}/Lib)
set(WEBOTS_SRC_DIR "D:/Program Files/Webots/src/controller/cpp")
set(WEBOTS_INC_C_DIR "D:/Program Files/Webots/include/controller/c")
set(WEBOTS_INC_CPP_DIR "D:/Program Files/Webots/include/controller/cpp")
set(WEBOTS_LIB_DIR "D:/Program Files/Webots/lib/controller")

set(EIGEN_INC_DIR "C:/Program Files (x86)/Eigen3/include")


set(QP_INC_DIR "C:/Program Files (x86)/qpOASES")
set(QP_LIB_DIR "C:/Program Files (x86)/qpOASES/lib")
set(QP_SRC_DIR D:/Mytask/mygit/qpOASES/src)
aux_source_directory (${QP_SRC_DIR}  SRC_LIST)

aux_source_directory(${TEST_SRC_DIR} SRC_LIST)

include_directories(
    ${EIGEN_INC_DIR} ${QP_INC_DIR} ${TEST_SRC_DIR} ${TEST_LIB_DIR} ${TEST_INC_DIR} ${WEBOTS_INC_CPP_DIR} ${WEBOTS_INC_C_DIR} ${WEBOTS_SRC_DIR} ${WEBOTS_LIB_DIR} 
)


message(---*****${EIGEN_INC_DIR}*****---)

add_executable(${PROJECT_NAME} ${SRC_LIST})

link_directories(${WEBOTS_LIB_DIR})

# Specify the path to libqpOASES.a directly
target_link_libraries(${PROJECT_NAME} ${WEBOTS_LIB_DIR}/Controller)
